/*
 * Copyright (c) 2025 GuoKaiHong (Shenzhen) Technology Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


export default interface IPrinterService {
  init(deviceId: number, callback: initCallback): void;

  selfCheck(callback: selfCheckCallback): void;

  printString(strData: string, iImme: number, callback: printStringCallback): void;

  printChinaString(strData: string, iImme: number, callback: printChinaStringCallback): void;

  printCutPaper(iMode: number, callback: printCutPaperCallback): void;

  printChargeRow(callback: printChargeRowCallback): void;

  setAlignment(iAlignment: number, callback: setAlignmentCallback): void;

  setSizeText(iHeight: number, iWidth: number, callback: setSizeTextCallback): void;

  setBold(iBold: number, callback: setBoldCallback): void;

  setSizeChar(iHeight: number, iWidth: number, iUnderline: number, iAsciiType: number,
    callback: setSizeCharCallback): void;

  setSizeChinese(iHeight: number, iWidth: number, iUnderline: number, iChineseType: number,
    callback: setSizeChineseCallback): void;

  printFeedDot(iNumber: number, callback: printFeedDotCallback): void;

  setClose(callback: setCloseCallback): void;

  setClean(callback: setCleanCallback): void;

  getStatus(callback: getStatusCallback): void;

  printQrcode(strData: string, iLMargin: number, iMSide: number, iRound: number, callback: printQrcodeCallback): void;

  print1DBar(iWidth: number, iHeight: number, iHriSize: number, iHriSeat: number, iCodeType: number, strData: string,
    callback: print1DBarCallback): void;

  printDiskImgFile(strPath: string, callback: printDiskImgFileCallback): void;

  printDiskBmpFile(strPath: string, callback: printDiskBmpFileCallback): void;
}

export type initCallback = (errCode: number, returnValue: number) => void;

export type selfCheckCallback = (errCode: number) => void;

export type printStringCallback = (errCode: number, returnValue: number) => void;

export type printChinaStringCallback = (errCode: number, returnValue: number) => void;

export type printCutPaperCallback = (errCode: number, returnValue: number) => void;

export type printChargeRowCallback = (errCode: number, returnValue: number) => void;

export type setAlignmentCallback = (errCode: number, returnValue: number) => void;

export type setSizeTextCallback = (errCode: number, returnValue: number) => void;

export type setBoldCallback = (errCode: number, returnValue: number) => void;

export type setSizeCharCallback = (errCode: number, returnValue: number) => void;

export type setSizeChineseCallback = (errCode: number, returnValue: number) => void;

export type printFeedDotCallback = (errCode: number, returnValue: number) => void;

export type setCloseCallback = (errCode: number, returnValue: number) => void;

export type setCleanCallback = (errCode: number, returnValue: number) => void;

export type getStatusCallback = (errCode: number, returnValue: number) => void;

export type printQrcodeCallback = (errCode: number, returnValue: number) => void;

export type print1DBarCallback = (errCode: number, returnValue: number) => void;

export type printDiskImgFileCallback = (errCode: number, returnValue: number) => void;

export type printDiskBmpFileCallback = (errCode: number, returnValue: number) => void;

